<?php
/**
 * SaleViewModel
 *
 * @author Mike Gao
 */
class Order_detailViewModel extends ViewModel{
    protected $pk  = 'Order_detail.id';

    public $viewFields = array(
    	'Order_detail' => array('*'),
    	'Order' => array('mano'=>'order_mano','po','_as'=>'Sale' , '_on' => 'Sale.id = Order_detail.order_id'),
    	'Customer' => array('name'=>'customer','concat(Customer.company,"; ",Customer.name)'=>'customer_info', '_on' => 'Sale.customer_id = Customer.id'),
        'Product' => array('id'=>'pid', 'name','ename','concat(Product.name,"; ",Product.ename)'=>'pname', 'cas','unit_id','_on' => 'Order_detail.product_id = Product.id'),
        
    );


}
?>
